com.supermap.realspace

Class Layer3Ds

  • java.lang.Object
    • com.supermap.realspace.Layer3Ds


  • public class Layer3Ds
    extends java.lang.Object
    3D layer collection class.

    This class manages all 3D layers in a 3D scene.

    A 3D scene window corresponds to a 3D scene, that is, only one 3D scene can be displayed in a 3D scene window. A 3D scene corresponds to a 3D layer set. The 3D layer set is responsible for managing the displayed in the 3D scene. All three-dimensional layers.

    The 3D layer collection class provides a method to find 3D layers, which can be used to find layers in the 3D scene based on the layer name or index.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Layer3Ds() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Layer3D add(java.lang.String iserverURL, Layer3DType layerType, java.lang.String layerName, boolean addToHead)
      Add 3D layer objects to the 3D layer collection through iServer data service.
      Layer3D add(java.lang.String tiantiduURL, Layer3DType layer3DType, java.lang.String layerName, double dpi, boolean addToHead)
      Add 3D layer objects to the 3D layer collection through Tiantu Data Service.
      Layer3D addLayerWith(java.lang.String path, Layer3DType layer3DType, boolean addToHead, java.lang.String layerName)
      Add layer data cached by iserver.
      Layer3D addLayerWith(java.lang.String path, Layer3DType layer3DType, boolean addToHead, java.lang.String layerName, java.lang.String password)
      Add iserver to cache layer data with password.
      Layer3D addLayerWithGoogleMaps(Layer3DType layer3DType, java.lang.String layerName, ImageFormatType imageFormatType, boolean addToHead)
      Add online Google image service
      Layer3D get(int index)
      Return the 3D layer object of the specified index in the 3D layer collection.
      Layer3D get(java.lang.String name)
      Return the 3D layer object with the specified name in the 3D layer collection.
      int getCount()
      Returns the total number of 3D layer objects in the given 3D layer set.
      int indexOf(java.lang.String name)
      Returns the index of the 3D layer with the specified name in this 3D layer collection.
      boolean removeLayerWithIndex(int index)
      Used to delete a 3D layer with a specified index from the 3D layer collection.
      boolean removeLayerWithName(java.lang.String layerName)
      It is used to delete a 3D layer with a specified name from the 3D layer collection.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Layer3Ds

        public Layer3Ds()
    • Method Detail

      • getCount

        public int getCount()
        Returns the total number of 3D layer objects in the given 3D layer set.
        Returns:
        The total number of 3D layer objects in the given 3D layer set.
      • get

        public Layer3D get(int index)
        Return the 3D layer object of the specified index in the 3D layer collection. The index of the 3D layer in the 3D layer set is numbered from 0.
        Parameters:
        index - The index of the 3D layer object to be searched.
        Returns:
        The 3D layer object of the specified index in the 3D layer collection.
      • get

        public Layer3D get(java.lang.String name)
        Return the 3D layer object with the specified name in the 3D layer collection.
        Parameters:
        name - The name of the 3D layer object to be searched.
        Returns:
        The 3D layer object with the specified name in the 3D layer collection.
      • removeLayerWithIndex

        public boolean removeLayerWithIndex(int index)
        Used to delete a 3D layer with a specified index from the 3D layer collection.
        Parameters:
        index - The index of the 3D layer to be deleted.
        Returns:
        Returns true if the deletion is successful, otherwise returns false.
      • removeLayerWithName

        public boolean removeLayerWithName(java.lang.String layerName)
        It is used to delete a 3D layer with a specified name from the 3D layer collection. If the deletion is successful, it will return true.
        Parameters:
        layerName - The name of the 3D layer to be deleted.
        Returns:
        Returns true if the deletion is successful, otherwise returns false.
      • add

        public Layer3D add(java.lang.String iserverURL,
                           Layer3DType layerType,
                           java.lang.String layerName,
                           boolean addToHead)
        Add 3D layer objects to the 3D layer collection through iServer data service.
        Parameters:
        iserverURL - specifies the URL of the iServer data service, such as: http://118.186.246.138:8091/iserver/services/realspace-Scene/rest/realspace/datas/xxlayer.
        layerType - specifies the 3D layer type. If the added data type does not match the layer type, the addition fails.
        layerName - The name of the 3D layer specified when publishing iServer data.
        addToHead - Whether to put the added 3D layer on top.
        Returns:
        The newly added 3D layer object.
      • add

        public Layer3D add(java.lang.String tiantiduURL,
                           Layer3DType layer3DType,
                           java.lang.String layerName,
                           double dpi,
                           boolean addToHead)
        Add 3D layer objects to the 3D layer collection through Tiantu Data Service.
        Parameters:
        tiantiduURL - specifies the URL of the Tianditu data service with a token (format: http://t0.tianditu.gov.cn/img_c/wmts?tk=token).
        layer3DType - specifies the 3D layer type. If the added data type does not match the layer type, the addition fails.
        layerName - The name of the 3D layer specified by the map data.
        dpi - device resolution.
        addToHead - Whether to put the added 3D layer on top.
        Returns:
        The newly added 3D layer object.
      • addLayerWith

        public Layer3D addLayerWith(java.lang.String path,
                                    Layer3DType layer3DType,
                                    boolean addToHead,
                                    java.lang.String layerName)
        Add layer data cached by iserver.
        Parameters:
        path - specifies the path for iServer to cache layer data.
        layer3DType - specifies the 3D layer type. If the added data type does not match the layer type, the addition fails.
        addToHead - Whether to put the added 3D layer on top.
        layerName - specifies the name of the 3D layer.
        Returns:
        The newly added 3D layer object.
      • addLayerWith

        public Layer3D addLayerWith(java.lang.String path,
                                    Layer3DType layer3DType,
                                    boolean addToHead,
                                    java.lang.String layerName,
                                    java.lang.String password)
        Add iserver to cache layer data with password.
        Parameters:
        path - specifies the path for iServer to cache layer data.
        layer3DType - specifies the 3D layer type. If the added data type does not match the layer type, the addition fails.
        addToHead - Whether to put the added 3D layer on top.
        layerName - specifies the name of the 3D layer.
        password - specifies the password for iServer to cache layer data.
        Returns:
        The newly added 3D layer object.
      • indexOf

        public int indexOf(java.lang.String name)
        Returns the index of the 3D layer with the specified name in this 3D layer collection.
        Parameters:
        name - The name of the 3D layer to be searched.
        Returns:
        The index of the 3D layer, or -1 if it does not exist.
      • addLayerWithGoogleMaps

        public Layer3D addLayerWithGoogleMaps(Layer3DType layer3DType,
                                              java.lang.String layerName,
                                              ImageFormatType imageFormatType,
                                              boolean addToHead)
        Add online Google image service
        Parameters:
        layer3DType -
        layerName -
        imageFormatType -
        addToHead -
        Returns: